package com.reactnativenavigation.utils;

/**
 * Created by wsj on 2017/11/20.
 */

public class CommonUtils {
    public static String captureName(String name) {
        char[] cs=name.toCharArray();
        cs[0]-=32;

        return String.valueOf(cs);
    }

    // 判断字符是否为空
    public static boolean isBlank(String str) {
        int strLen;
        if(str != null && (strLen = str.length()) != 0) {
            for(int i = 0; i < strLen; ++i) {
                if(!Character.isWhitespace(str.charAt(i))) {
                    return false;
                }
            }

            return true;
        } else {
            return true;
        }
    }
}
